package train48days;

import java.util.Scanner;

public class 汽水瓶 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        while (sc.hasNext()){
            int n = sc.nextInt();
            while (n!=0){
                System.out.println(ok(n));
//                System.out.println(n/2);
            }
        }
    }
    private static int ok( int n ){
        if (n == 1){
            return 0;
        }
        if (n==2){
            return 1;
        }
        return ok(n-2)+1;
    }
}
